package com.zsh.weather.ln.db

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import com.zsh.weather.ln.bean.CityEntry

@Dao
interface CityDao {
    @Query("SELECT * FROM CityEntry")
    fun loadCitys(): MutableList<CityEntry>
    @Query("SELECT * FROM CityEntry WHERE name LIKE :name")
    fun isExisy(name: String): List<CityEntry>
    @Delete
    fun deleteCitys(vararg citys: CityEntry)

    @Insert
    fun insterCity(city: CityEntry)
}